Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: multi-version seata protocol support #6226

Merged
merged 74 commits into from
Jun 27, 2024

Conversation

Bughue
Copy link
Contributor

@Bughue Bughue commented Dec 29, 2023

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

multi-version protocol support
#5628

前置PR(front PR):
#6208
#6209

Ⅱ. Does this pull request fix one issue?

fixes #6225

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@Bughue Bughue changed the title optimize : multi-version protocol support [WIP]optimize : multi-version protocol support Dec 29, 2023
Bughue added 16 commits March 8, 2024 19:20
…v-complete-v1

# Conflicts:
#	core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java
…ialize-version

# Conflicts:
#	core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolV1Decoder.java
#	core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java
…nto dev-mlv-complete-v1

# Conflicts:
#	core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java
…plete-v1

# Conflicts:
#	core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingServer.java
#	core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java
#	core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java
#	core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java
#	serializer/seata-serializer-seata/src/main/java/org/apache/seata/serializer/seata/SeataSerializer.java
@Bughue Bughue changed the title [WIP]optimize : multi-version protocol support optimize : multi-version protocol support Jun 24, 2024
@funky-eyes funky-eyes added this to the 2.2.0 milestone Jun 24, 2024
@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. type: feature Category issues or prs related to feature request. module/core core module and removed type: bug Category issues or prs related to bug. labels Jun 24, 2024
@funky-eyes funky-eyes changed the title optimize : multi-version protocol support feature: multi-version seata protocol support Jun 24, 2024
* <li>Body Length: Full Length - Head Length</li>
* </p>
*/
public class CompatibleProtocolEncoder extends MessageToByteEncoder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be renamed MultiProtocolEncoder

@@ -35,6 +35,8 @@ public class RpcMessage implements Serializable {
private Map<String, String> headMap = new HashMap<>();
private Object body;

private String otherSideVersion;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么要在rpcmessage中增加版本字段?
Why add a version field to rpcmessage?

}


private RpcMessage buildResponseMessage(Channel channel, RpcMessage fromRpcMessage, Object msg, byte messageType) {
RpcMessage rpcMessage = super.buildResponseMessage(fromRpcMessage, msg, messageType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不能直接通过channel上下文中的版本去创建对应协议版本的子类?
Why can't I create a subclass of the corresponding protocol version directly from the version in the channel context?

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/core core module protocol type: feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multi-version protocol support
3 participants